//具体同事
public class ConcreteColleagueB implements Colleague {
    private Mediator mediator;
    private String name;
    public ConcreteColleagueB(Mediator mediator,String name) {
     this.mediator = mediator;
     this.name = name;
     this.mediator.register(name, this);
    }
    @Override
    public void send(String targetName,String message) {
       this.mediator.relay(targetName, message);
    }

    @Override
    public void receive(String message) {
        System.out.println(name + " received: " + message);
    }
}
